package com.sleep.blog.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sleep.blog.dao.dos.Archives;
import com.sleep.blog.dao.pojo.Article;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Sleep-6000
 * @date 2021/9/10
 */
@Repository
public interface ArticleMapper extends BaseMapper<Article> {

    /**
     * 文章归并
     * @return Archives
     */
    List<Archives> listArchives();

    /**
     * 文章归档
     * @param page 分页
     * @param categoryId categoryId
     * @param tagId tagId
     * @param year year
     * @param month month
     * @return 查询结果
     */
    IPage<Article> listArticle(Page<Article> page, Long categoryId, Long tagId, String year, String month);
}
